ComparableNullOrNotNegativeAttribute

Ecng.ComponentModel

Indicates that a comparable value must be either null or not negative.

継承元: ComparableValidationAttribute<T>

メソッド

Validate
protected override bool Validate(T? value, bool disableNullCheck)
result = comparableNullOrNotNegativeAttribute.Validate(value, disableNullCheck)

Validates that the value is null or not negative.

value
The nullable value to validate.
disableNullCheck
A flag indicating whether null check should be disabled (not used in this case).

戻り値: True if the value is null or the non-null value is not negative; otherwise, false.